﻿//-----------------------------------------------------------------------
// <copyright file="RepositoryProviderConfiguration.cs" company="FastNET Services">
//     Copyright (c) 2008-2013. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System.Configuration;

#endregion

namespace FastNet.RepositorySystem.Configuration
{
    /// <summary>
    /// AppConfig class for managing the repository providers
    /// </summary>
    public class RepositoryProviderConfiguration : ConfigurationSection
    {
        /// <summary>
        /// Gets a list of all providers in the configured collection
        /// </summary>
        [ConfigurationProperty("providers")]
        public ProviderSettingsCollection Providers
        {
            get
            {
                return (ProviderSettingsCollection)base["providers"];
            }
        }

        /// <summary>
        /// Gets or sets the current provider to utilize
        /// </summary>
        [ConfigurationProperty("current", DefaultValue = "defaultProvider")]
        public string Current
        {
            get
            {
                return (string)base["current"];
            }

            set
            {
                base["current"] = value;
            }
        }
    }
}